package 设计模式.创建型.单例模式.一处理资源冲突问题打印日志的程序.最初实现;

import java.io.IOException;

public class OrderController {
    private Logger logger = new Logger();

    public OrderController() throws IOException {
    }

    public void create(OrderVo order) throws IOException {
        // ...省略业务逻辑代码...
        logger.log("Created an order: " + order.toString());
    }
}